# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Mark Wagie <mark.wagie@tutanota.com>

pkgname=python-moddb
pkgver=0.10.0
pkgrel=1
pkgdesc='A Python scraper to access ModDB mods, games and more as objects'
arch=(any)
url=https://github.com/ClementJ18/moddb
license=('MIT')
depends=(
  python-beautifulsoup4
  python-pyrate-limiter
  python-requests
  python-toolz
)
makedepends=(
  git
  python-build
  python-installer
  python-setuptools
  python-wheel
)
_tag=536b4235c27377bfac552bef5ebfe30a01419fa9
source=(git+https://github.com/ClementJ18/moddb.git#tag=${_tag})
b2sums=(SKIP)

pkgver() {
  cd moddb
  git describe --tags | sed 's/^v//'
}

build() {
  cd moddb
  python -m build --wheel --no-isolation
}

package() {
  python -m installer --destdir="${pkgdir}" moddb/dist/*.whl
  install -Dm 644 moddb/LICENSE -t "${pkgdir}"/usr/share/licenses/python-moddb/
}

# vim: ts=2 sw=2 et:
